package expression.v1;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import expression.v1.config.DBConfig;
import expression.v1.config.DataSourceConfig;
import expression.v1.config.ExpConfig;

//@Configuration
@ComponentScan
@EnableAutoConfiguration
@EnableConfigurationProperties({ExpConfig.class,DataSourceConfig.class})
public class Main extends WebMvcConfigurerAdapter {

	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(Main.class);
	}

	public static void main(String[] args) throws Exception {
		SpringApplication.run(Main.class, args);
		//System.out.println(ResourceUtils.getFile("file:D:/Test/abc/"));
//		System.out.println(new File("D:/Test/expressions/").exists());
	}
}
